<Rate @bind-Value="val" ShowText/>

@code {
    double val = 3;
}